package com.ranjiaqi.testreflact;

import java.io.File;
import java.io.IOException;

/**
 * @ClassName HomeWork02
 * @Description TODO
 * @Author hp
 * @Date 2021/7/5 18:47
 * @Version 1.0
 **/
public class Mytxt{
    public  void myCreate() throws IOException {
        File file = new File("D:/myhello.txt");
        if(!file.exists()){
            file.createNewFile();
            System.out.println("创建成功");
        }else {
            System.out.println("文件已经存在");
        }

    }
}
